import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import dev_url from "./src/env/development.js";

export default defineConfig({
  plugins: [uni()],
  server: {
    port: 8080,
    proxy: {
      "/api": {
        target: dev_url.url, // 自己的云服务
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ""),
      },
    },
  },
});
